package com.hopfield;

import com.hopfield.configuration.Configuration;
import com.hopfield.neuron.Layer;
import com.hopfield.neuron.Neuron;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author per.ringqvist
 */
public class HopfieldInitializer {
    
    public static HopfieldRunner initialize(Configuration config){

        List <Layer> layers = new ArrayList <Layer>(); 
        
        for (int i = 0; i < config.getLayers(); i++) {
            layers.add(i,new Layer(new ArrayList<Neuron>()));
            
            for (int j = 0; j < config.getNumbersOfNeurons(); j++) {
                layers.get(i).getNeurons().add(j,new Neuron());
                
                
            }
        } 
        return new HopfieldRunner();
    }
}
